import { getAccessToken } from '@/utils/storage.js'
import env from '@/.env'

/**
 * 跳转到通知公告 webview 页面
 * @param {string} id 公告 id
 */
export function goToAnnouncementWebview(id) {
  uni.navigateTo({
    url: `/pages/webview/index?link=${encodeURIComponent(
      `${env.WEBVIEW_URL}/announcementdetail?id=${id}&token=${getAccessToken()}`,
    )}`,
  })
}
